package com.bbx.androidapi.util;

import java.math.BigDecimal;

import android.text.TextUtils;

public class DataUtil {

	/**
	 * 四舍五入取整
	 * @param value
	 * @return
	 */
	public static int getIntRoundOff(String value) {

		int result = 0;
		if (!TextUtils.isEmpty(value)) {
			result = new BigDecimal(value)
					.setScale(0, BigDecimal.ROUND_HALF_UP).intValue();
		}
		return result;
	}
}
